Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re: #1290: Add sign and verify CLI commands #1292

Merged
merged 2 commits into from
Mar 1, 2020
Merged

Re: #1290: Add sign and verify CLI commands #1292

merged 2 commits into from
Mar 1, 2020

Conversation

arajasek
Copy link
Contributor

Basically as in #1290. Usage is as follows:

  • lotus wallet sign <msg> signs <msg> with the wallet's default account
  • lotus wallet sign --from <addr> <msg> signs with
  • lotus waller verify <addr> <msg> <sigBytes> prints "Valid" if is a valid signature of by , else prints "Invalid"

@Kubuxu
Copy link
Contributor

Kubuxu commented Feb 26, 2020

IMO sign and verify should be taking in files (and stdin as an option/default).
Failure to verify should exist with non-0 exit code.
We have to apply domain separation for signed messages.

@arajasek
Copy link
Contributor Author

IMO sign and verify should be taking in files (and stdin as an option/default).
Failure to verify should exist with non-0 exit code.
We have to apply domain separation for signed messages.

Thanks for the review, @Kubuxu!

  1. I'm definitely open to taking in files instead of the actual message and signature, though that's not what issue proposed...Anyone else have thoughts about this? I'm good either way.
  2. Done 👍
  3. I'm not sure what "domain separation for signed messages" means, sorry! Can you elaborate? :)

@arajasek
Copy link
Contributor Author

@magik6k Implemented and tested the custom error, the error log is now set to DEBUG in main.go. Can you please take a look to make sure I'm using Go correctly? :)

- The command takes an address and a message (in hex) and prints out a signature of the msg
- The command takes an address, message, and signature, and returns true if the sig is valid
@magik6k magik6k merged commit 3c7880c into master Mar 1, 2020
@magik6k magik6k deleted the asr/clisign branch March 1, 2020 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants